Skip to content

rad init --preview should be able to work with radius.core environments.#11639

Merged
nithyatsu merged 47 commits into
radius-project:mainfrom
nithyatsu:working
May 5, 2026
Merged

rad init --preview should be able to work with radius.core environments.#11639
nithyatsu merged 47 commits into
radius-project:mainfrom
nithyatsu:working

Conversation

@nithyatsu
Copy link
Copy Markdown
Contributor

@nithyatsu nithyatsu commented Apr 14, 2026

Description

  • Adds rad init --preview (new init flow) and wires it into the CLI, while preserving existing rad init behavior.
  • Implements Radius.Core environment creation/selection in preview init
  • Updates rad env update --preview --recipe-packs to replace the environment recipe pack list (supports comma-separated values) and adds tests.
  • Refactors shared rad init prompt logic into pkg/cli/cmd/radinit/common and adds coverage for the extracted helpers.
  • updated rad deploy to create and inject default recipepack for any radius.core environment which dont have any recipepack.
  • fixed rad env update to take a comma seperated list of recipepacks , than using update to only add a pack incrementally.

Type of change

  • This pull request adds or changes features of Radius and has an approved issue (issue link required).

Fixes: #11490

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

@nithyatsu nithyatsu had a problem deploying to external-contributor-approval April 14, 2026 00:32 — with GitHub Actions Failure
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 40.76577% with 789 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.06%. Comparing base (21ead27) to head (5ee7e48).

Files with missing lines Patch % Lines
pkg/cli/test_client_factory/radius_core.go 0.00% 189 Missing ⚠️
pkg/cli/cmd/radinit/common/display.go 0.00% 165 Missing ⚠️
pkg/cli/cmd/radinit/common/azure.go 0.00% 153 Missing ⚠️
pkg/cli/cmd/radinit/common/aws.go 0.00% 84 Missing ⚠️
pkg/cli/cmd/radinit/preview/environment.go 67.33% 30 Missing and 19 partials ⚠️
pkg/cli/cmd/radinit/preview/init.go 77.77% 29 Missing and 9 partials ⚠️
pkg/cli/cmd/radinit/common/cloud.go 42.42% 17 Missing and 2 partials ⚠️
pkg/cli/cmd/deploy/deploy.go 63.04% 11 Missing and 6 partials ⚠️
pkg/cli/recipepack/recipepack.go 64.44% 16 Missing ⚠️
pkg/cli/cmd/radinit/common/application.go 65.51% 5 Missing and 5 partials ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11639      +/-   ##
==========================================
- Coverage   51.46%   51.06%   -0.40%     
==========================================
  Files         699      715      +16     
  Lines       44130    44940     +810     
==========================================
+ Hits        22710    22949     +239     
- Misses      19255    19817     +562     
- Partials     2165     2174       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nithyatsu nithyatsu marked this pull request as ready for review April 23, 2026 15:44
@nithyatsu nithyatsu requested a review from a team as a code owner April 23, 2026 15:44
Copilot AI review requested due to automatic review settings April 23, 2026 15:44
@nithyatsu nithyatsu requested a review from a team as a code owner April 23, 2026 15:44
@nithyatsu nithyatsu marked this pull request as draft April 23, 2026 15:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a --preview implementation path for rad init (and supporting plumbing) to target Radius.Core environments, including default recipe pack creation/injection and shared radinit prompting logic.

Changes:

  • Adds rad init --preview runner + shared radinit/common helpers for cluster/cloud/app prompts.
  • Introduces a pkg/cli/recipepack helper to create/ensure the default recipe pack and uses it from env create/deploy flows.
  • Updates env update recipe-pack semantics (replace list) and expands the test client factory to support new scenarios.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/functional-portable/cli/noncloud/cli_test.go Removes a dev-recipe functional test and related imports.
pkg/cli/test_client_factory/radius_core.go Extends fake Core RP servers (env/recipe packs) for new test scenarios.
pkg/cli/recipepack/recipepack.go Adds helpers for default recipe pack IDs/resources and ensure/create logic.
pkg/cli/recipepack/recipepack_test.go Adds unit tests for default recipe pack generation.
pkg/cli/cmd/utils.go Adds helper to populate recipe-pack clients by scope.
pkg/cli/cmd/utils_test.go Adds tests for recipe-pack client population.
pkg/cli/cmd/radinit/preview/options.go Adds interactive init options gathering for preview runner.
pkg/cli/cmd/radinit/preview/init.go Adds rad init --preview command/runner wiring and execution flow.
pkg/cli/cmd/radinit/preview/init_test.go Adds extensive validation/run tests for preview init.
pkg/cli/cmd/radinit/preview/environment.go Implements preview environment creation using Radius.Core APIs + default recipe pack.
pkg/cli/cmd/radinit/preview/display.go Adds preview TUI summary/progress display.
pkg/cli/cmd/radinit/preview/cluster.go Delegates cluster option selection to common helpers.
pkg/cli/cmd/radinit/preview/cloud.go Delegates cloud provider selection to common helpers.
pkg/cli/cmd/radinit/preview/azure.go Implements Azure provider prompting for preview init.
pkg/cli/cmd/radinit/preview/aws.go Implements AWS provider prompting for preview init.
pkg/cli/cmd/radinit/preview/application.go Delegates application scaffolding prompts to common helpers.
pkg/cli/cmd/radinit/preview/application_test.go Tests preview application prompt flow.
pkg/cli/cmd/radinit/common/cluster.go New shared cluster selection/install-state helper code.
pkg/cli/cmd/radinit/common/cluster_test.go Tests for shared cluster helpers.
pkg/cli/cmd/radinit/common/cloud.go New shared cloud-provider prompt flow.
pkg/cli/cmd/radinit/common/cloud_test.go Tests for shared cloud-provider flow.
pkg/cli/cmd/radinit/common/application.go New shared application scaffold/name selection flow.
pkg/cli/cmd/radinit/common/application_test.go Tests for shared application helpers.
pkg/cli/cmd/radinit/cluster.go Refactors legacy init cluster selection to use shared helpers.
pkg/cli/cmd/radinit/cloud.go Refactors legacy init cloud provider selection to use shared helpers.
pkg/cli/cmd/radinit/application.go Refactors legacy init application prompts to use shared helpers.
pkg/cli/cmd/env/update/preview/update.go Changes recipe-pack flag to “replace list” behavior and improves messaging.
pkg/cli/cmd/env/update/preview/update_test.go Updates/extends tests to validate recipe-pack replacement + warning output.
pkg/cli/cmd/env/create/preview/create.go Ensures default recipe pack exists and links it when creating an env.
pkg/cli/cmd/env/create/preview/create_test.go Expands tests around default recipe pack creation and error paths.
pkg/cli/cmd/deploy/deploy.go Injects default recipe pack into templates for Radius.Core environments when missing.
pkg/cli/cmd/deploy/deploy_test.go Adds tests covering recipe-pack injection behavior during deploy.
pkg/cli/bicep/resources.go Enhances template inspection to return Radius.Core environment resources.
cmd/rad/cmd/root.go Wires rad init preview routing via --preview.

Comment thread pkg/cli/cmd/radinit/preview/aws.go Outdated
Comment thread pkg/cli/recipepack/recipepack.go
Comment thread cmd/rad/cmd/root.go
Comment thread pkg/cli/cmd/utils_test.go
Comment thread pkg/cli/cmd/utils.go
Comment thread pkg/cli/cmd/radinit/preview/init.go
Comment thread pkg/cli/cmd/radinit/preview/display.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/aws.go Outdated
@nithyatsu nithyatsu marked this pull request as ready for review April 23, 2026 19:17
@nithyatsu nithyatsu changed the title rad init new + old env support with a --preview flag rad init --preview should be able to work with new environments and recipe pack. Apr 23, 2026
@nithyatsu nithyatsu changed the title rad init --preview should be able to work with new environments and recipe pack. rad init --preview should be able to work with radius.core environments. Apr 23, 2026
@brooke-hamilton brooke-hamilton requested a review from Copilot April 27, 2026 13:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 10 comments.

Comment thread pkg/cli/cmd/radinit/preview/environment.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/options.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/init.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/display.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/display.go Outdated
Comment thread pkg/cli/cmd/utils_test.go
Comment thread pkg/cli/bicep/resources.go
Comment thread pkg/cli/recipepack/recipepack.go
Comment thread pkg/cli/cmd/radinit/preview/display.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/display.go Outdated
Comment thread pkg/cli/cmd/radinit/preview/init.go Outdated
Comment thread pkg/cli/cmd/env/update/preview/update.go
Comment thread pkg/cli/cmd/radinit/preview/aws.go
@nithyatsu nithyatsu requested review from kachawla and willtsai May 4, 2026 21:48
@nithyatsu nithyatsu requested a review from a team as a code owner May 4, 2026 21:49
nithyatsu and others added 24 commits May 5, 2026 08:52
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Signed-off-by: nithyatsu <nithyasu@microsoft.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@willtsai willtsai linked an issue May 5, 2026 that may be closed by this pull request
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented May 5, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository nithyatsu/radius
Commit ref 5ee7e48
Unique ID func3a852858eb
Image tag pr-func3a852858eb
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func3a852858eb
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func3a852858eb
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func3a852858eb
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func3a852858eb
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func3a852858eb
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@nithyatsu nithyatsu merged commit 1d1b316 into radius-project:main May 5, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support both new and old env with rad init using --preview flag Default Recipe Packs for K8s

4 participants